/*
 * AdministrarUsuarios.java
 *
 * Created on 06-dic-2011, 16:19:21
 */

package interfazgrafica.administrarusuarios;

import interfazgrafica.ayuda.VentanaAyuda;

/**
 * Ventana encargada de mostrar las opciones de administrar los usuarios.
 * @author Lauaa
 */
public class AdministrarUsuarios extends javax.swing.JFrame {

    String args[];

    /** Creates new form AdministrarUsuarios */
    public AdministrarUsuarios() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jButtonAñadirUsuario = new javax.swing.JButton();
        jButtonEliminarUsuario = new javax.swing.JButton();
        jButtonCambiar = new javax.swing.JButton();
        jButtonAyuda = new javax.swing.JButton();

        setName("Form"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(cowmanager.CowManagerApp.class).getContext().getResourceMap(AdministrarUsuarios.class);
        jButtonAñadirUsuario.setText(resourceMap.getString("jButtonAñadirUsuario.text")); // NOI18N
        jButtonAñadirUsuario.setName("jButtonAñadirUsuario"); // NOI18N
        jButtonAñadirUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAñadirUsuarioActionPerformed(evt);
            }
        });

        jButtonEliminarUsuario.setText(resourceMap.getString("jButtonEliminarUsuario.text")); // NOI18N
        jButtonEliminarUsuario.setName("jButtonEliminarUsuario"); // NOI18N
        jButtonEliminarUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonEliminarUsuarioActionPerformed(evt);
            }
        });

        jButtonCambiar.setText(resourceMap.getString("jButtonCambiar.text")); // NOI18N
        jButtonCambiar.setName("jButtonCambiar"); // NOI18N
        jButtonCambiar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonCambiarActionPerformed(evt);
            }
        });

        jButtonAyuda.setText(resourceMap.getString("jButtonAyuda.text")); // NOI18N
        jButtonAyuda.setName("jButtonAyuda"); // NOI18N
        jButtonAyuda.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAyudaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(71, 71, 71)
                .addComponent(jButtonAñadirUsuario)
                .addGap(18, 18, 18)
                .addComponent(jButtonEliminarUsuario)
                .addGap(117, 117, 117))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(341, Short.MAX_VALUE)
                .addComponent(jButtonAyuda)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addGap(57, 57, 57)
                .addComponent(jButtonCambiar)
                .addContainerGap(96, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(51, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jButtonEliminarUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButtonAñadirUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, 114, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addComponent(jButtonCambiar, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(40, 40, 40)
                .addComponent(jButtonAyuda)
                .addGap(12, 12, 12))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonAñadirUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAñadirUsuarioActionPerformed
        AddUsuario.main(args);
    }//GEN-LAST:event_jButtonAñadirUsuarioActionPerformed

    private void jButtonEliminarUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonEliminarUsuarioActionPerformed
        EliminarUsuario.main(args);
    }//GEN-LAST:event_jButtonEliminarUsuarioActionPerformed

    private void jButtonCambiarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCambiarActionPerformed
        CambiarAdministrador.main(args);
    }//GEN-LAST:event_jButtonCambiarActionPerformed

    private void jButtonAyudaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAyudaActionPerformed
        VentanaAyuda ayuda = new VentanaAyuda("Administrar usuarios");
        ayuda.setVisible(true);
    }//GEN-LAST:event_jButtonAyudaActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new AdministrarUsuarios().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonAyuda;
    private javax.swing.JButton jButtonAñadirUsuario;
    private javax.swing.JButton jButtonCambiar;
    private javax.swing.JButton jButtonEliminarUsuario;
    // End of variables declaration//GEN-END:variables

}
